home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-21 | 1.4 KB | 49 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWStrgAr.tpp
- // Release Version: $ 1.0d1 $
- //
- // Creation Date: 3/28/94
- //
- // Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWSTRGAR_H
- #include "FWStrgAr.h"
- #endif
-
- #ifndef FWARSTRM_H
- #include "FWArStrm.h"
- #endif
-
- #pragma segment Strings
-
- #include "FWStrs.tpp"
-
- //----------------------------------------------------------------------------------------
- // FW_TStringArchiver<tString>::Read
- //----------------------------------------------------------------------------------------
-
- template <class tString>
- void * FW_TStringArchiver<tString>::Read(FW_CReadableArchive & archive)
- {
- tString * string = FW_NEW(tString, ());
- FW_CStringArchiver::Read(archive, *string);
- return string;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_TStringArchiver<tString>::Write
- //----------------------------------------------------------------------------------------
-
- template <class tString>
- void FW_TStringArchiver<tString>::Write(FW_CWritableArchive & archive,
- const void *object)
- {
- const FW_CString* objectString = (const FW_CString*)object;
- const tString* string = FW_DYNAMIC_CAST(tString, objectString);
- FW_ASSERT(string != 0);
- FW_CStringArchiver::Write(archive, *string);
- }
-